#include <iostream>
#include <string>

int main()
{
	std::string str = "";

	std::cout << "Enter string: ";
	std::getline(std::cin, str);

	int num_0 = 0;
	int num_1 = 0;

	for(int i = 0; i < str.length(); ++i)
	{
		if('0' == str[i])
		{
			++num_0;
		}
		if('1' == str[i])
		{
			++num_1;
		}
	}

	std::cout << " 0: " << num_0 << "\n"
		      << " 1: " << num_1 << "\n";

	return 0;
}